package common.code;

public class PageTool {
	public int page;//当前页数
	public int size;//每页所查询的数量
	public int sumPage;//总页数
	
	public int getSumPage() {
		return sumPage;
	}
	public void setSumPage(int sumPage) {
		this.sumPage = sumPage;
	}
	public int getPage() {
		return page;
	}
	public void setPage(int page) {
		this.page = page;
	}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	
	public static int getSumPageNum(int allNum,int pageNum){
		int sumPageNum = 0;
		if(allNum % pageNum == 0){
			sumPageNum = allNum/pageNum;
		}else{
			sumPageNum = allNum/pageNum + 1;
		}
		return sumPageNum;
	}
}